package com.photo.tagger;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.widget.FrameLayout;
import android.widget.LinearLayout.LayoutParams;

public class TagEdit extends FrameLayout {

	
	
	private TagArea tagArea;
	private RemoveButton removeButton;

	private LayoutParams params;
	private int ID;
	private int x;
	private int y;

	public TagEdit(Context context,int x,int y) {
		super(context);
		this.x=x;
		this.y=y;
		this.setBackgroundColor(Color.TRANSPARENT);
		// instantiating objects
		tagArea = new TagArea(context);
		removeButton = new RemoveButton(context);
		params = new LayoutParams(LayoutParams.WRAP_CONTENT,
				LayoutParams.WRAP_CONTENT);
		
		prepareItems();
		addItemsToLayout();

	}

	public void prepareItems() {
		// tagArea Properties
		tagArea.setBackgroundColor(Color.TRANSPARENT);
	}

	public void addItemsToLayout() {
		this.addView(tagArea, params);
		this.addView(removeButton, params);
	}

	@Override
	public void draw(Canvas canvas) {
		// TODO Auto-generated method stub
		super.draw(canvas);
		
	}
	
	// getter and setter methods
	public int getID() {
		return ID;
	}

	public void setID(int iD) {
		ID = iD;
	}

	public RemoveButton getRemoveButton() {
		return removeButton;
	}

	public void setRemoveButton(RemoveButton removeButton) {
		this.removeButton = removeButton;
	}

	public TagArea getTagArea() {
		return tagArea;
	}

	public void setTagArea(TagArea tagArea) {
		this.tagArea = tagArea;
	}
	// end of getter and setter methods
}
